package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.FriendshipLink;
import com.caigou.bean.cms.param.FriendshipLinkParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FriendshipLinkMapper {
    FriendshipLink selectByPrimaryKey(Integer id);
    int deleteByPrimaryKey(Integer id);
    List<FriendshipLink> listFriendshipLink();
    int insertSelective(FriendshipLink friendshipLink);
    int updateFriendshipLink(FriendshipLink friendshipLink);
    int getFriendshipLinkCountByLinkTypeId(@Param("linkTypeId") Integer linkTypeId);
    List<FriendshipLink> listFriendshipLinkByLinkTypeId(@Param("linkTypeId") Integer linkTypeId);
    Integer selectMaxRank();
    int updateRankForDelete(@Param("rank") Integer rank);
    int updateRankForFront(FriendshipLinkParam param);
    int updateRankForBack(FriendshipLinkParam param);
    FriendshipLink getByRank(Integer rank);
}
